<template>
  <div class="root">
    <img :class="'icon i'+icon" :src="icons[icon]" alt="">
    <div class="title">{{ title }}</div>
    <div class="total">{{ data }}</div>
  </div>
</template>

<script>
import wy from '@/assets/images/wy.png' // 导入图片
import xq from '@/assets/images/xq.png'
import ggs from '@/assets/images/ggs.png'
import rys from '@/assets/images/rys.png'

export default {
  name: 'GirdItem',
  components: {},
  props: {
    title: {
      type: String,
      require: true
    },
    icon: {
      type: Number,
      require: true
    },
    data: {
      type: Number,
      require: true
    }
  },
  data() {
    return {
      icons: [wy, ggs, xq, rys]
    }
  },
  created() {
  },
  mounted() {
  },
  computed: {},
  watch: {},
  methods: {}
}
</script>

<style lang="scss" scoped>
.root {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 222px;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0px 2px 4px 0px rgb(191 191 191 / 75%);
  padding: 32px 24px;
  .icon {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    &.i0{
      box-shadow: 0 0 10px rgba(3, 214, 195, 0.4);
    }
    &.i1{
      box-shadow: 0 0 10px rgba(254, 144, 80, 0.5);
    }
    &.i2{
      box-shadow: 0 0 10px rgba(78, 109, 248, 0.45);
    }
    &.i3{
      box-shadow: 0 0 10px rgba(8, 136, 255, 0.5);
    }
  }
  .title {
    font-size: 18px;
    color: #666666;
  }
  .total {
    font-size: 30px;
    font-weight: bold;
  }
}
</style>
